// test_with_env.js - 带环境变量加载的测试
const dotenv = require('dotenv');
const path = require('path');

// 加载环境变量
const envPath = path.resolve(__dirname, '.env');
dotenv.config({ path: envPath });

console.log("DEEPSEEK_API_KEY:", process.env.DEEPSEEK_API_KEY ? "已设置" : "未设置");

console.log("开始测试vectorStoreService...");

try {
    const service = require('./services/vectorStoreService');
    console.log("✓ vectorStoreService 导入成功");
    console.log("测试完成。");
} catch (error) {
    console.error("✗ vectorStoreService 导入失败:", error.message);
    console.error("堆栈跟踪:", error.stack);
}